
/**
 *
 *  bool        Boolean, one byte
 *  byte        Signed byte
 *  i16         Signed 16-bit integer
 *  i32         Signed 32-bit integer
 *  i64         Signed 64-bit integer
 *  double      64-bit floating point value
 *  string      String
 *  binary      Blob (byte array)
 *  map<t1,t2>  Map from one type to another
 *  list<t1>    Ordered list of one type
 *  set<t1>     Set of unique elements of one type
 *
 */

namespace java bcm.remotecomm


/**
 * Structs can also be exceptions, if they are nasty.
 */
exception RemoteCommException {
  1: i32 whatOp,
  2: string why
}

service RemoteComm{
   void ping(),
	
	void clearBuffer(1:i32 cid),

	binary readUntil(1:i32 cid, 2:binary flag, 3:i64 timeout) throws (1:RemoteCommException e),
	
	binary command(1:i32 cid, 2:bool cleanBuffer, 3:binary dataWrite, 4:binary readSOHFlag, 5:binary readEOTFlag, 6:i64 timeout) throws (1:RemoteCommException e),
			
	void write(1:i32 cid, 2:binary buffer, 3:binary suffix) throws (1:RemoteCommException e),
	
	bool isConnected(1:i32 cid),
	
	i32 connect(1:string host,2:i32 port) throws (1:RemoteCommException e),
	
	void disconnect(1:i32 cid),
	
	bool keepConnect(1:i32 cid), 
	
	void kickOut(), 

}

